home *** CD-ROM | disk | FTP | other *** search
- DIM(3I) Last changed: 4-13-99
-
-
- NNAAMMEE
- DDIIMM, DDDDIIMM, QQDDIIMM, IIDDIIMM, IIIIDDIIMM, JJIIDDIIMM, KKIIDDIIMM - Computes positive
- difference of two numbers
-
- SSYYNNOOPPSSIISS
- DDIIMM (([XX==]_x,,[YY==]_y))
- DDDDIIMM (([XX==]_x,,[YY==]_y))
- QQDDIIMM (([XX==]_x,,[YY==]_y))
- IIDDIIMM (([XX==]_x,,[YY==]_y))
- IIIIDDIIMM (([XX==]_x,,[YY==]_y))
- JJIIDDIIMM (([XX==]_x,,[YY==]_y))
- KKIIDDIIMM (([XX==]_x,,[YY==]_y))
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, IRIX systems
-
- CF90, MIPSpro 7 Fortran 90, MIPSpro Fortran 77
-
- SSTTAANNDDAARRDDSS
- Fortran
-
- Fortran extensions: QQDDIIMM, IIIIDDIIMM, JJIIDDIIMM, KKIIDDIIMM
-
- DDEESSCCRRIIPPTTIIOONN
- DDIIMM is the generic function name; the others are specifics. These are
- elemental intrinsic functions. They accept the following arguments:
-
- _x Must be of type integer or real.
-
- _y Must be of the same type and kind type as _x.
-
- These functions solve for:
-
- _R = _x - _x , if _x > _x
- 1 2 1 2
- _R = 0, if _x <= _x
- 1 2
- NNOOTTEESS
- The DDIIMM, IIDDIIMM, and DDDDIIMM intrinsic funtion names can be passed as
- arguments; the others cannot.
-
- RREETTUURRNN VVAALLUUEESS
- DDIIMM evaluates two real numbers and subtracts them. The result is a
- real positive difference.
-
- DDDDIIMM evaluates two double-precision real numbers and subtracts them.
- The result is a double-precision real positive difference.
-
- QQDDIIMM evaluates two quad-precision real numbers and subtracts them.
- The result is a quad-precision real positive difference.
-
- IIDDIIMM evaluates two integers and subtracts them. The result is an
- integer positive difference.
-
- IIIIDDIIMM evaluates two integer (KIND=2) numbers and subtracts them. The
- result is an integer (KIND=2) positive difference.
-
- JJIIDDIIMM evaluates two integer (KIND=4) numbers and subtracts them. The
- result is an integer (KIND=4) positive difference.
-
- KKIIDDIIMM evaluates two integer (KIND=8) numbers and subtracts them. The
- result is an integer (KIND=8) positive difference.
-
- EEXXAAMMPPLLEESS
- The following program shows the use of IIDDIIMM to compute the positive
- difference between the integers 77 and 10:
-
- PROGRAM DIMTEST
- INTEGER A,B,C,D,E
- A = 77
- B = 10
- C = IDIM(A,B)
- WRITE 1,A,B,C
- 1 FORMAT(I2,'POSITIVE DIFFERENCE ',I2,' EQUALS ', I2)
- D = IDIM(B,A)
- WRITE 2,B,A,D
- 2 FORMAT(I2,'POSITIVE DIFFERENCE ',I2,' EQUALS ',I2)
- STOP
- END
-
- The example program gives the following output:
-
- 77 POSITIVE DIFFERENCE 10 EQUALS 67
- 10 POSITIVE DIFFERENCE 77 EQUALS 0
-
- SSEEEE AALLSSOO
- _I_n_t_r_i_n_s_i_c _P_r_o_c_e_d_u_r_e_s _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l for the printed version of this
- man page.
-